#!/usr/bin/python
# Copyright 2012, Kitware, Inc.

"""Exercise 2: Plotting Lena"""

from pylab import *
from scipy.misc import lena

figure("Part 1")
imshow(lena())
gray()

figure("Part 2")
imshow(lena().T)
gray()

figure("Part 3")
imshow(lena())
points = rand(2, 100) * 512
scatter(points[0], points[1])

figure("Part 4")
hist(lena().flatten(), 100)

figure("Part 5")
image = lena()
image[200:400, 200:400] = image[200:400, 400:200:-1]
imshow(image)

show()